package com.qfmy.model.entity.novel;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author 清风明月
 * @Package com.qfmy.model.entity.novel
 * @date 2025/11/13
 * @description 评论回复表实体类（对应二级评论，关联主评论表）
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CommentReplies {

    @Schema(description = "子评论ID（主键）")
    private Integer replyId;

    @Schema(description = "父评论ID（关联主评论表 novel_comments 的 comment_id）")
    private Integer parentCommentId;

    @Schema(description = "回复用户ID（谁发的回复，关联 user 表的 user_id）")
    private Integer userId;

    @Schema(description = "回复用户昵称")
    private String username;

    @Schema(description = "回复用户头像URL")
    private String avatar;

    @Schema(description = "被回复用户ID（关联 user 表的 user_id，可为空）")
    private Integer replyToUserId;

    @Schema(description = "被回复用户昵称（可为空）")
    private String replyToUserName;

    @Schema(description = "回复内容（不可为空）")
    private String content;

    @Schema(description = "回复时间（默认当前时间，不可为空）")
    private Date replyTime;

    @Schema(description = "回复点赞数（默认0，不可为空）")
    private Integer likeCount;

    @Schema(description = "用户是否点赞")
    private Boolean isLiked;

}